<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!-- DWR -->
<script type="text/javascript" src="dwr/engine.js"></script>
<script type='text/javascript' src="dwr/util.js"></script>
<script type="text/javascript" src="dwr/interface/MessageReplyDWR.js"></script>
<script type="text/javascript" src="dwr/interface/MessageDWR.js"></script>
<script type="text/javascript" src="dwr/interface/LoadPageDWR.js"></script>
<script type="text/javascript">
dwr.engine._errorHandler = function(message, ex) {dwr.engine._debug("Error: " + ex.name + ", " + ex.message, true);};
</script>
<!-- DWR -->    
    
<script type="text/javascript">
<!--
var user = eval('(${req_user})');
var messagereply_cnt = 0;
$(function(){
	$('.dropdown-toggle').dropdown();	
});
//-->

function quit(){	
	$.post('User_quit', function(result){
		result = eval('('+result+')');
		if (result.success){
			window.location.href = 'index.jsp';			
		} else {
			serverpush_alert_after('alert alert-error','错误', result.msg, $('#navbar_menu'));
		}
	});
}

function receiveMessageReply(data){
	data = eval('('+data+')');
	if (data.success){
		//messagereply_cnt = messagereply_cnt + 1;
		$('#b_messagecnt').text(data.msg);
		setTimeout( function(){ 
			$('#menuMessages').attr('class', 'dropdown open');	
		} , 100);
	} else {
		
	}
}

</script>
<div id="navbar_menu" class="navbar navbar-fixed-top">
	<div class="navbar-inner">
        <div class="container">                    
          <div class="nav-collapse collapse">
            <ul class="nav nav-pills">
              <li class="">
                <a href="./index.html">首页</a>
              </li>
              <li class="">
                <a href="#" >应用广场</a>
              </li>
              <li class="">
                <a href="./base-css.html">论坛</a>
              </li>
              <li id="menuMessages" class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" >
                	消息<b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                      <li class=""><a href="#one">查看回复</a></li>                      
                      <li class="divider"></li>                
                      <li class=""><a href="#two">收到<b id="b_messagecnt">0</b>条回复信息</a></li>
                    </ul>
              </li>
              	
             	<li id="menuAccount" class="dropdown">             		
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <i class="icon-user"></i>
                    	账户 <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                      <li class=""><a href="#one">个人信息</a></li>
                      <li class=""><a href="#two">设置</a></li>
                      <li class="divider"></li>                      
                      <li class=""><a onclick="quit()">退出</a></li>
                    </ul>
                  </li>
            </ul>
          </div>
        </div>
	</div>      
</div>